#include <iostream>
 
using namespace std;
 
void print(int small, int big)
{
	for(; small<=big; small++)
	{
		cout<<small<<" ";
	}
	cout<<endl;
}
 
void findCount(int n)
{
	int small = 1;
	int big = 2;
	int sum = small + big;
	while(small < big && small<(n+1)/2)
	{
		if(sum < n)
		{
			big++;
			sum += big;
		}
		else if(sum > n)
		{
			sum -= small;
			small++;
		}
		else
		{
			print(small, big);
			sum -= small;
			small++;
		}
	}
 
	
}
 
int main(void)
{
	findCount(15);
	return 0;
}